// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** addReport POST /api/report/add */
export async function addReportUsingPost(
  body: API.ReportAddRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseLong_>('/api/report/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** deleteReport POST /api/report/delete */
export async function deleteReportUsingPost(
  body: API.DeleteRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/report/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** getReportById GET /api/report/get */
export async function getReportByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getReportByIdUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseReport_>('/api/report/get', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** listReport GET /api/report/list */
export async function listReportUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listReportUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseListReport_>('/api/report/list', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** listReportByPage GET /api/report/list/page */
export async function listReportByPageUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listReportByPageUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageReport_>('/api/report/list/page', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** updateReport POST /api/report/update */
export async function updateReportUsingPost(
  body: API.ReportUpdateRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/report/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
